Skip to content

Add C# highlighting - #802

Merged
lhecker merged 11 commits into
microsoft:mainfrom
CringeCronge:main
Jul 29, 2026
Merged

Add C# highlighting#802
lhecker merged 11 commits into
microsoft:mainfrom
CringeCronge:main

Conversation

@CringeCronge

Copy link
Copy Markdown
Contributor

This adds fairly comprehensive support for C# highlighting. I would like if someone checked if I have placed the keywords in the correct place as C# has quite of lot of them!

All test were passed when running cargo test -q

This is my first time contributing to open source project, so feel free to scrutinise this contribution!

@CringeCronge

Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree

@BrettKinny

Copy link
Copy Markdown

There appears to be a clash with int/internal
image

@BrettKinny

Copy link
Copy Markdown

The letter 'T' is not handled correctly
image

@lhecker lhecker changed the title Add C# highlighting support Add C# highlighting Jul 22, 2026
@lhecker
lhecker enabled auto-merge (squash) July 29, 2026 14:20
@lhecker
lhecker disabled auto-merge July 29, 2026 14:23
@lhecker
lhecker merged commit 68d54e4 into microsoft:main Jul 29, 2026
3 checks passed
@lhecker lhecker mentioned this pull request Jul 29, 2026
@lhecker

lhecker commented Jul 29, 2026

Copy link
Copy Markdown
Member

Thanks!

@Frulfump

Frulfump commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Nice, when is this expected to ship? And was the issue BrentKinny brought up above with T and int being colored incorrectly in some cases fixed?

@lhecker

lhecker commented Jul 29, 2026

Copy link
Copy Markdown
Member

Not sure. I'll make a release based on my gut feeling, because getting permissions to release something is a real hassle.

IIRC yes the issue was fixed. This regex engine implement left-most match first semantics so int|internal will match int because it comes first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants